<template>
    <div>
        <div class="item" v-for="(item, index) of list" :key="index">
            <div class="item-title border-bottom">
                <span class="item-title-icon"></span>
                {{item.title}}
            </div>
            <div v-if="item.children" class="item-children">
                <detail-list :list="item.children"></detail-list>
            </div>
        </div>
    </div>
</template>

<script>
export default {
  name: 'DetailList',
  props: {
    list: Array
  }
}
</script>

<style lang="stylus" scoped>
    .item-title
        line-height: .8rem
        padding: 0 .2rem
        font-size: .32rem
        .item-title-icon
            display: inline-block
            text-overflow: ellipsis
            background-image: linear-gradient(126deg,#00e0ca 0,#00bfd4 100%)
            border-radius: .06rem
            height: .24rem
            min-width: .08rem
            margin-right: .1rem
    .item-children
        padding: 0 .2rem
</style>
